package com.bjsxt.chapter12_chainOfResponsibility;

/**
 * @ClassName Leader
 * @Description 领导类
 * @Author 黑马程序员
 * @Date 10:40 2024/6/23
 * @Version 1.0
 **/
public abstract class Leader {

    protected String name;
    // 责任链上的后继对象
    protected Leader nextLeader;

    public Leader(String name) {
        this.name = name;
    }

    public void setNextLeader(Leader nextLeader) {
        this.nextLeader = nextLeader;
    }

    // 处理请求的方法
    public abstract void handler(LeaveRequest req);

}
